<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">

		<title>EmpList</title>
		<!-- Bootstrap core CSS -->
		<link href="/static/asserts/css/bootstrap.min.css" rel="stylesheet">
		<!-- Custom styles for this template -->
		<link href="/static/asserts/css/dashboard.css" rel="stylesheet">
	</head>

	<body>
		<!--引入抽取的topbar-->
		<!--模板名：会使用thymeleaf的前后缀配置规则进行解析-->
		<div th:replace="commons/bar::topbar"></div>

		<div class="container-fluid">
			<div class="row">
				<!--引入侧边栏-->
				<div th:replace="commons/bar::#sidebar(activeUri='emp')"></div>

				<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
					<div class="table-responsive">
						<table class="table table-striped table-sm">
							<thead>
								<tr>
									<th>#</th>
									<th>userSex</th>
									<th>userBirthday</th>
									<th>userName</th>
									<th>userBalance</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="user:${users}">
									<td th:text="${user.userId}"></td>
									<td th:text="${user.userSex}"></td>
									<td th:text="${user.userBirthday}"></td>
									<td th:text="${user.userName}"></td>
									<td th:text="${user.userBalance}"></td>
									<td>
										<a class="btn btn-sm btn-primary" th:href="@{'/admin/user/'+${user.userId}}">编辑</a>
										<a class="btn btn-sm btn-primary" th:href="@{'/admin/user/delete/'+${user.userId}}">删除</a>

									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</main>
				<form id="deleteEmpForm"  method="post">
					<input type="hidden" name="_method" value="delete"/>
				</form>
			</div>
		</div>

		<!-- Bootstrap core JavaScript
    ================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
		<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js" th:src="@{/webjars/jquery/3.3.1/jquery.js}"></script>
		<script type="text/javascript" src="asserts/js/popper.min.js" th:src="@{/webjars/popper.js/1.11.1/dist/popper.js}"></script>
		<script type="text/javascript" src="asserts/js/bootstrap.min.js" th:src="@{/webjars/bootstrap/4.0.0/js/bootstrap.js}"></script>


	</body>
</html>